﻿using AdminBase.Model;
using AdminBase.Model.Entitys;

namespace AdminBase.Interface
{
    /// <summary>
    /// 角色业务接口
    /// </summary>
    public interface IRolesService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="role">实体</param>
        /// <returns></returns>
        bool Add(Roles role);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="role"></param>
        /// <returns></returns>
        bool Edit(Roles role);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        bool Del(long id);

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        bool BatchDel(List<long> idList);

        /// <summary>
        /// 根据ID获取角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Roles GetRoleById(long id);

        /// <summary>
        /// 获取角色列表
        /// </summary>
        /// <param name="queryParam">查询参数</param>
        /// <param name="pageBase">分页查询</param>
        /// <returns></returns>
        PageInfo GetRoles(RolesQueryParam queryParam, PageBase pageBase);

        /// <summary>
        /// 获取全部角色用于下拉框
        /// </summary>
        /// <returns></returns>
        List<RolesOptionDto> GetRolesOption();

        /// <summary>
        /// 设置权限
        /// </summary>
        /// <returns></returns>
        bool SetPermissions(RolesDto rolesDto);
    }
}
